import React from 'react'
import { useLocation,useParams,useSearchParams } from 'react-router-dom'
import List from './List'
export default function () {
    //接收Login组件传递过来的state参数
    // let obj = useLocation()
    // console.log(obj.state)
    //接收Login组件传递过来的params参数,注意接收的是一个数组，要调用get方法才能获取到值
    let [obj,setObj] = useSearchParams()
    console.log(obj.get('name'))
    console.log(obj.get('age'))
    return (
        <div><List /></div>
    )
}
